<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use Keling\Menu\Repositories\MenuRepository;

class MenuController extends CommonController
{
	public $menuRepository;
    //
	public function __construct(MenuRepository $menuRepository)
	{
		$this->menuRepository = $menuRepository;
	}

	public function lists(){
		// 显示全部 参数一 $kile 参数二  $is 1 返回一维菜单 其余返回递归菜单
		$data = $this->menuRepository->all();
//         添加
//        $data = $this->menuRepository->create('菜单', '1', '1');
//        查询
//        $data = $this->menuRepository->show(1);
//        删除
//        $data = $this->menuRepository->destroy(1);
//        修改
//        $data = $this->menuRepository->store(['id' => 1], ['name' => '修改']);
		return $data;

//		return $this->success(1);
	}
}
